﻿@model Wicresoft.UnifyShow2.Portal.Models.PermissionModel
<script src="@Url.Content("~/Scripts/message_validate.js")" type="text/javascript"></script>
<div>
    @using (Html.BeginForm("UserEdit", "AdminPermission", FormMethod.Post, new Dictionary<string, object>() { { "id", "userEditorForm" } }))
    {
        <fieldset>
            <legend>@Model.UserName 权限配置</legend>
            <fieldset class="fieldset1">
                <table>
                    <tbody>
                        <tr>
                            <td width="240">
                                <label>
                                    姓名：</label>@Html.DisplayFor(model => model.UserName)@Html.HiddenFor(model => model.UserName)
                            </td>
                            @Html.HiddenFor(model => model.UserID)
                            <td width="240">
                                <label>
                                    公司：</label>@Html.DisplayFor(model => model.UserSite)@Html.HiddenFor(model => model.UserSite)
                            </td>
                        </tr>
                        <tr>
                            <td width="240">
                                <label>
                                    登录名：</label>@Html.DisplayFor(model => model.LoginID)@Html.HiddenFor(model => model.LoginID)
                            </td>
                            <td width="240">
                                <label>
                                    邮箱：</label>@Html.EditorFor(model => model.Email)
                                <span id="spEmail" class="errMsg"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="240">
                                <label>
                                    联系方式：</label>@Html.EditorFor(model => model.Mobile)
                                <span id="spMobile" class="errMsg"></span>
                            </td>
                            <td width="240">
                                <label>
                                    部门：</label>@Html.DropDownList("DepartmentSelect", ViewData["Departments"] as IEnumerable<SelectListItem>, new { style = "width: 155px;" })
                            </td>
                        </tr>
                        <tr>
                            <td width="240">
                                <label>
                                    职务：</label>@Html.EditorFor(model => model.Position)
                                <span id="spPosition" class="errMsg"></span>
                            </td>
                            <td width="260">
                                <label>
                                    员工编码：</label>@Html.EditorFor(model => model.PeopleNo)
                            </td>
                        </tr>
                        <tr>
                            <td width="240">
                                <label>
                                    删除：</label>@Html.EditorFor(model => model.Disabled)
                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
            <fieldset class="fieldset1">
                <label>
                    系统配置管理员：</label>@Html.EditorFor(model => model.IsConfigAdmin)
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <div style="display: none;">
                    <label>
                        省领导：</label>@Html.EditorFor(model => model.IsLeader)</div>
            </fieldset>
            @*-----------------------修改-------------------*@
            <fieldset class="fieldset1">
                <label>
                    统一登录门户：</label>@Html.EditorFor(model => model.IsRelevance)
            </fieldset>
            <table style="display: none;">
                <tbody>
                    <tr>
                        <td>
                            <fieldset class="fieldset2">
                                <label>
                                    集中展现：</label>@Html.EditorFor(model => model.IsAccessUS)<br />
                                <br />
                                @{
        List<Wicresoft.UnifyShow2.Portal.Models.US_SiteAccessModel> uslist = Model.US_SiteAccessList;
        for (int i = 0; i < uslist.Count; i++)
        {
                                    <label>@uslist[i].Alias：</label>
                                    @Html.EditorFor(model => model.US_SiteAccessList[i].IsAccess)
                                    @Html.HiddenFor(model => model.US_SiteAccessList[i].ID)
                                        
        }
                                }
                            </fieldset>
                        </td>
                        <td>
                            <fieldset class="fieldset2">
                                <label>
                                    监控系统：</label>@Html.EditorFor(model => model.IsAccessGJ)<br />
                                <br />
                                @{
        List<Wicresoft.UnifyShow2.Portal.Models.GJ_SiteAccessModel> gjlist = Model.GJ_SiteAccessList;
        for (int i = 0; i < gjlist.Count; i++)
        {
                                    <label>@gjlist[i].Alias：</label>
                                    @Html.EditorFor(model => model.GJ_SiteAccessList[i].IsAccess)
                                    @Html.HiddenFor(model => model.GJ_SiteAccessList[i].ID)
        }
                                }
                            </fieldset>
                        </td>
                        <td>
                            <fieldset class="fieldset2">
                                <label>
                                    ITSM：</label>@Html.EditorFor(model => model.IsAccessITSM)<br />
                            </fieldset>
                        </td>
                    </tr>
                </tbody>
            </table>
        </fieldset>
    }</div>
<style type="text/css">
    .errMsg
    {
        color: red;
        margin-left: 39px;
        font-size: 11px;
        font-style: italic;
        display: none;
    }
</style>
<script type="text/javascript">
    $(function () {
        customMessageVaildate();
    });
</script>
